package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.CompileInfoBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class GetCompileInfoMethods extends BaseMethods {

    private static GetCompileInfoMethods m_ins = null;

    public static GetCompileInfoMethods getInstance() {
        if (m_ins == null) {
            synchronized (GetCompileInfoMethods.class) {
                if (m_ins == null) {
                    m_ins = new GetCompileInfoMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Personal/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void userinfo(Subscriber<CompileInfoBean> subscriber,
                      int uid,
                      String hashid ) {
        Observable observable = initService().userinfo(System.currentTimeMillis()+"",
                "e785f07736bde4d62b77d03214d29647",uid,hashid
        );
        toSubscribe(observable, subscriber);
    }
}
